<script setup lang="ts">
import locale from 'element-plus/dist/locale/zh-cn.mjs'

import UpdateDialog from './components/application/src/UpdateDialog.vue'

const visible = ref<boolean>(false)

useSignInCheck()
useSetTitle()
useCreateMessageBox()

onMounted(() => {
  document.body.addEventListener('plugin_web_update_notice', () => {
    visible.value = true
  })
})
</script>

<template>
  <el-config-provider :locale="locale" size="default">
    <router-view />
    <update-dialog v-model:visible="visible" />
    <basic-message-box />
  </el-config-provider>
</template>

<style scoped></style>
